1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Dynamic Diuse Global Illumination using Light Field Probes
WILLIAM XIE, University of California, Berkeley
BRANDON SHIN, University of California, Berkeley
BRIAN ROYSTON, University of California, Berkeley
HAN WANG, University of California, Berkeley
Due to the low-frequency nature of indirect diuse lighting, irradiance volumes (or so-called “light probes”) are widely used to simulate
convincing indirect diuse lighting in real-time. However, conventional light probe-based global illumination requires static lights, and
may cause light leaking throughout the scene. By extending the idea of irradiance volumes used conventional light eld probe-based
solutions, this paper provides a solution for real-time indirect diuse lighting. To support dynamic light sources, we save GBuer
instead of irradiance for each probe in the oine calculation and relight probes at runtime. We further implemented a visibility test to
x light leaking when sampling from occluded light probes. The experiment result indicates a scalable and promising performance of
the proposed approach.
CCS Concepts: Computing methodologies Rendering.
Additional Key Words and Phrases: global illumination, light eld probes
ACM Reference Format:
William Xie, Brandon Shin, Brian Royston, and Han Wang. 2022. Dynamic Diuse Global Illumination using Light Field Probes. 1, 1
(May 2022), 14 pages.
Fig. 1. Sponza with Dynamic Light Source: Inner First Floor
Authors’ addresses: William Xie, University of California, Berkeley; Brandon Shin, University of California, Berkeley; Brian Royston, University of
California, Berkeley; Han Wang, University of California, Berkeley.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not
made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for components
of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to
redistribute to lists, requires prior specic permission and/or a fee. Request permissions from permissions@acm.org.
© 2022 Association for Computing Machinery.
Manuscript submitted to ACM 1
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
2 Xie, et al.
1 INTRODUCTION
Real-time global illumination is considered the "holy grail" of computer graphics. Due to the low-frequency nature of
indirect diuse lighting, irradiance volumes (or so-called “light probes”) are widely used to simulate plausible indirect
diuse lighting in real-time. Levoy et al. rstly applied the concept of the light slab to encode a rectangular subset of
the light eld[
1
]. Such methods often place light probes in the scene, precompute the radiance transfer at each probe’s
position oine, and store the irradiance info in dierent formats (e.g. cubemaps, spherical harmonics, etc.). Then we
could reconstruct the irradiance at a surface given its world position and normal direction.
However, to acquire an accurate representation of the indirect diuse lighting, such methods require the rendering
scene to be fully static both in terms of the geometry, as well as the lighting conditions, which is dicult to achieve
in applications such as video games. At the same time, because the light probes voxelize the scene’s indirect diuse
information at a fairly low resolution, we need to sample the nearest several probes and compute a weighted average
as the nal irradiance. Yet this will introduce light leaking if we only use conventional trilinear interpolation among
the probes, since we assume all the nearest probes are visible to the sample point. This assumption does not always
hold true, especially at the boundaries between an indoor area and an outdoor area, where the inner faces of the
boundaries will receive the wrong outdoor lighting due to the interpolation among the probes around. To support real
time rendering and x the light leaking problem, McGuire et al.[
2
] proposed a light probe based illumination approach
with a visibility test to encode and apply to real-time rendering: a light eld parameterization that can be evaluated at
any point in space with correct occlusion.
Inspired by[
2
4
] this project aims to provide a solution for real-time indirect diuse lighting by extending the the idea
of irradiance volumes in conventional light eld probe based solutions. By embedding an augmented GBuer structure
into each probe, the geometry properties are pre-calculated at oine stage to accelerate the real-time rendering. The
proposed solution supports dynamic light sources at runtime with static major scene geometries. As shown in Figure 1,
a modied Sponza scenario is utilized for the realtime rendering test.
2 METHODOLOGY
The proposed approach consists of two phases, oine and runtime: the geometry properties are pre-calculated at
oine stage and stored into an augmented GBuer structure for each probe. The probes will be relighted and used for
sampling at runtime rendering.
Fig. 2. Cube Map of GBuer
Manuscript submitted to ACM
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
Dynamic Diuse Global Illumination using Light Field Probes 3
2.1 Oline Processing
In the implementation of this paper, the light probes are uniformly placed in the scene using a uniform grid structure.
At each probe position, we set up a camera to capture the GBuer cubemap. The camera has an aspect of 1.0 and a
fov of 90. We then rotate the camera in order of the six faces of the cubemap and render it. It is worth to note that
the cubemap is drawn with mirror symmetry in the horizontal direction, which requires the projection matrix to be
multiplied by a scale of (-1, 1, 1), and then the pipeline is set to inverted culling during drawn. The contents stored in
the GBuer cubemap include:
(1) GBuer 0 (𝑅𝐺𝐵𝐴8_𝑈 𝑁𝑂𝑅𝑀): RGB - Albedo, A - Sky Visibility
(2) GBuer 1 (𝑅𝐺8_𝑈 𝑁𝑂𝑅𝑀): RG - Normal (Octahedron Encoded)
(3) GBuer 2 (𝑅16_𝑆𝐹 𝐿𝑂𝐴𝑇 ): R - Radial Distance
The visualization of captured GBuer cubemap is shown in Figure 2. The sky visibility is a binary variable used to
indicate whether the skybox is visible or not, which will be used in the probe radiance update phase to mix the results
of the skybox sampling. The value of the skybox in our current implementation is:
𝐴𝑙𝑏𝑒𝑑𝑜 =
0,
𝑁𝑜𝑟𝑚𝑎𝑙
= negative
sampling direction and the 𝑅𝑎𝑑𝑖𝑎𝑙 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 is clamped to the maximum visible distance.
Fig. 3. Visualization of GBuer
The resolution of the cubemap captured in this step is 256x256x6, which is too high to be used in the actual game to
update the lighting, so a low-resolution octahedron map[
5
] was chosen to map the cubemap results. We have chosen to
use a resolution of 16x16 for the GBuer information and 32x32 for the visibility buer (VBuer) information. Here
we use hemisphere sampling to calculate the mean value: 1. rst calculate the cosine weights 2. A power function is
applied to give higher weights to points closer to the center, which we control with a sharpness parameter (usually
Manuscript submitted to ACM
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
4 Xie, et al.
between 50 to 90). The binary sky visibility will be converted to a normalized value of 0-1. All results are normalized by
𝑤𝑒𝑖𝑔ℎ𝑡𝑇𝑜𝑡𝑎𝑙. The radial depth in GBuer 2 and depth in the VBuer are stored separately for two reasons:
(1)
When the probes are relighted at runtime, the data in the GBuer are mapped directly to the corresponding
texel without padding. Meanwhile we will bilinear sample the VBuer during visibility test, and the octahedron
map requires special processing (1 pixel padding) at the border to support bilinear ltering (so the actual nal
resolution is 30x30)
(2)
Since the VBuer is stored in r16, the accuracy is highly limited. We are also storing
𝐸(𝑥
2
)
, which could easily
lead to an explosion of the oating point precision, so the radial depth of the VBuer needs to be clamped. In
the implementation, we search for the nearest 8 probes and clamp the value to the distance of longest diagonal
in the cell made up of every 8 probes. However, the radial depth in the GBuer is used to reconstruct the
world space position in order to sample shadowmaps and the probes from the previous frame. Clamping causes
signicant undesirable changes to this location, so this radial depth needs to be stored separately.
The captured probe data are stored as several texture 2d arrays on the disk. Theses data will be loaded into VRAM
during runtime, which is visualized in Figure 3.
2.2 Runtime Processing
2.2.1 Runtime Update. For each frame we need to update the irradiance information of the probe, specically 3 tasks
are required:
(1) Update the radiance of the probe. The radiance is updated by a simple lambert diuse lighting to reduce cost:
Diuse = Albedo / PI ·𝑠𝑎𝑡𝑢𝑟𝑎𝑡𝑒 (𝑁𝑑𝑜𝑡𝐿) · 𝑠ℎ𝑎𝑑𝑜𝑤_𝑣𝑖𝑠 + 𝐴𝑙𝑏𝑒𝑑𝑜/𝑃𝐼 · irradiance from previous frame
Sky = sample_skybox
Radiance = lerp(diuse, sky, sky_visibility)
Indirect light shadowing is implemented in this step to avoid light leakage in the interior of the room. We used
the radial depth to reconstruct the world coordinates and then sampled the cascaded shadow maps. Irradiance
from previous frame is included in the update of diuse in order to achieve innite bounce light. The eect
with and without bounce light is shown in Figure 4
(2)
Update the irradiance of the probe: The simple cosine weighted hemisphere Monte Carlo sampling is applied in
this step to obtain the irradiance map.
(3) Make a pixel padding to the irradiance probe: Essentially the same as the VBuer padding
The visualization of updated radiance and irradiance at runtime is shown in Figure 5
2.2.2 Runtime Sampling. During the lighting stage of the scene geometry, the nearest 8 probes are sampled for a given
surface’s world position and normal. The weight is calculated based on the following criteria:
(1)
Trilinear interpolation based on probes’ positions: This is simply performed by calculating the linear interpola-
tion weights on each of the x,y,z axes and obtain the product of the three weights.
(2)
The dot product between the direction to the probe and the sample normal. A min value wrapping is implemented
in this step as this is not as important as other tests
(3)
Visibility test based on Chebyshev inequality: The distance from the sampled point to the probe is calculated rst.
If this distance is greater than the nearest surface distance recorded by the probe in the corresponding direction,
it means that this probe is not visible from the sampling position. To avoid aliasing due to the particularly
Manuscript submitted to ACM
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
Dynamic Diuse Global Illumination using Light Field Probes 5
Fig. 4. No Bounce vs Infinite Bounce
Fig. 5. Radiance and Irradiance
low resolution of the VBuer, we compute the variance of the depth distribution on the direction and apply
Chebyshev inequality to determine the possibility that the probe is not visible, and thus to achieve a smooth
transition. Similar to shadowmap sampling to avoid shadow acne, here a bias is subtracted to prevent self
occlusion; variance weight is cubed to improve contrast; and a minimum boundary for clamp is set to avoid a
zero in the denominator. Figure 6 shows the performance of visibility on avoiding lighting leaking at object
corners.
To optimize shadowing, a 4-level cascaded shadowmaps[
6
] around the camera view frustum is constructed as shown
in Figure 7 . The probes always sample the last cascade to ensure maximum sample coverage. The eect of shadowing
is shown in Figure 8. In the DDGI without shadowing on the probe radiance, the light leaking in the interior of room is
very severe, and with shadowing on this is largely improved, although there is still signicant light leaking the corners.
The visibility test further alleviates this problem.
Manuscript submitted to ACM
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
6 Xie, et al.
Fig. 6. Eect of Visibility Test
Fig. 7. 4-level Cascaded Shadowmaps
Fig. 8. Shadowing vs No Shadowing
Manuscript submitted to ACM
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
Dynamic Diuse Global Illumination using Light Field Probes 7
3 RESULTS
As demonstration, we render the modied Sponza scenario at 3840x2160 on a GeForce 1660ti laptop. Our implementation
is built on the Unity engine using the shaders from our supplement. Without the hardware raytracing acceleration, our
realtime rendering achieves a stable frame rate over 60fps. The render results could be nd in the appendix.
4 FUTURE WORK
Although the experiment result indicates a scalable and promising performance of the proposed approach, several
drawbacks and corresponding tentative future work are worth to note: (1) Inaccurate shadowing caused by the nature
of cascade shadow map: As the properties of the camera change in real time, the corresponding frustum will also
change, which may cause the shadows to change dramatically in two consecutive frames, resulting in shadow jitters
and lacking temporal coherence. In this paper we have taken the approach of sampling the highest level cascade to
guarantee maximum coverage to alleviate this problem, but this has led to the problem of shadow aliasing being more
pronounced. (2) Alternate irradiance update approach: the irradiance map is utilized in current implementation for a
lower bandwidth usage during sampling stage (one sample per read). The problem, however, is that on the one hand
the memory footprint is large and on the other hand it is troublesome for lighting translucent objects and volumetric
eects. [
3
] provides a feasible solution: they convolve octahedron radiance into spherical harmonic basis to extract the
main light direction for illuminating translucent objects and volumetric fog; and use the obtained spherical harmonic
coecients to generate the irradiance map to speed up the indirect lighting of opaque objects. (3) Not applicable to large
scene: During the rendering process in runtime, despite the fact that we are doing downsampling, the huge number
of probes will take up a lot of memory. Adaptive placement of probes rather than uniform placement would alleviate
this problem. (4) Lack of high frequency details: The low-frequency nature of diuse global illumination allows us
to reduce the probe resolution, but this also results in a lack of high-frequency details. The use of some screen space
techniques (e.g. screen space ambient occlusion, screen space global illumination) to supplement high frequency details
is a possible way to improve image quality.
5 CONTRIBUTION
William Xie conceived of the proposed idea. William Xie developed the oine processing tool. Brian Royston and
William Xie worked on the runtime probe update. Brandon Shin and William Xie worked on the runtime probe sampling.
Han Wang conducted the sanity test and organized the manuscript. All authors contributed to the review of manuscript.
REFERENCES
[1]
Marc Levoy and Pat Hanrahan. Light eld rendering. In Proceedings of the 23rd annual conference on Computer graphics and interactive techniques,
pages 31–42, 1996.
[2]
Morgan McGuire, Mike Mara, Derek Nowrouzezahrai, and David Luebke. Real-time global illumination using precomputed light eld probes. In
Proceedings of the 21st ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, pages 1–11, 2017.
[3] Bruce Woodard. Advanced graphics summit: Lifting the fog: Geometry amp; lighting in ’demon’s souls’, Jul 2021.
[4]
Zander Majercik, Jean-Philippe Guertin, Derek Nowrouzezahrai, and Morgan McGuire. Dynamic diuse global illumination with ray-traced
irradiance elds. Journal of Computer Graphics Techniques (JCGT), 8(2):1–30, June 2019.
[5] Thomas Engelhardt and Carsten Dachsbacher. Octahedron environment maps. In VMV, pages 383–388, 2008.
[6]
Fan Zhang, Hanqiu Sun, Leilei Xu, and Lee Kit Lun. Parallel-split shadow maps for large-scale virtual environments. In Proceedings of the 2006 ACM
international conference on Virtual reality continuum and its applications, pages 311–318, 2006.
Manuscript submitted to ACM
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
8 Xie, et al.
A SPONZA RENDERING
The video presentation could be nd here
The demonstration videos could be nd here: video 1: Sponza Timelapse, video 2: Sponza Hallway.
Fig. 9. GBuer: Albedo
Fig. 10. GBuer: Normal
Manuscript submitted to ACM
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
Dynamic Diuse Global Illumination using Light Field Probes 9
Fig. 11. GBuer: Radiance
Fig. 12. Final Lighting
Manuscript submitted to ACM
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
10 Xie, et al.
Fig. 13. Sponza: Inner First Floor
Fig. 14. Sponza: Overview (directional light intensity is set to 500 to exaggerate indirect diuse)
Manuscript submitted to ACM
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
Dynamic Diuse Global Illumination using Light Field Probes 11
Fig. 15. Sponza: Direct Light
Fig. 16. Sponza: Fake GI from Skybox
Manuscript submitted to ACM
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
12 Xie, et al.
Fig. 17. Sponza: Our GI, No Indirect Shadowing
Fig. 18. Sponza: One Bounce
Manuscript submitted to ACM
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
Dynamic Diuse Global Illumination using Light Field Probes 13
Fig. 19. Sponza: Multi Bounce
Fig. 20. Sponza Curtains: No Visibility Test
Manuscript submitted to ACM
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
14 Xie, et al.
Fig. 21. Sponza Curtains: One Bounce with Visibility Test
Fig. 22. Sponza Curtains: Multi Bounce
Manuscript submitted to ACM